home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / CMMComponent.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  12.2 KB  |  406 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        CMMComponent.h
  3.  
  4.      Contains:    ColorSync CMM Component API
  5.  
  6.      Version:    Technology:    ColorSync 2.6
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1994-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __CMMCOMPONENT__
  18. #define __CMMCOMPONENT__
  19.  
  20. #ifndef __QUICKDRAW__
  21.     #include <Quickdraw.h>
  22. #endif
  23.  
  24. #ifndef __COMPONENTS__
  25.     #include <Components.h>
  26. #endif
  27.  
  28. #ifndef __CMAPPLICATION__
  29.     #include <CMApplication.h>
  30. #endif
  31.  
  32.  
  33.  
  34.  
  35. #if PRAGMA_ONCE
  36. #pragma once
  37. #endif
  38.  
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42.  
  43. #if PRAGMA_IMPORT
  44. #pragma import on
  45. #endif
  46.  
  47. #if PRAGMA_STRUCT_ALIGN
  48.     #pragma options align=mac68k
  49. #elif PRAGMA_STRUCT_PACKPUSH
  50.     #pragma pack(push, 2)
  51. #elif PRAGMA_STRUCT_PACK
  52.     #pragma pack(2)
  53. #endif
  54.  
  55. enum {
  56.     CMMInterfaceVersion            = 1
  57. };
  58.  
  59.  
  60. /* Component function selectors */
  61. enum {
  62.                                                                 /* Required */
  63.     kNCMMInit                    = 6,
  64.     kCMMMatchColors                = 1,
  65.     kCMMCheckColors                = 2,
  66.  
  67.                                                                 /* Optional */
  68.     kCMMValidateProfile            = 8,
  69.     kCMMMatchBitmap                = 9,
  70.     kCMMCheckBitmap                = 10,
  71.     kCMMMatchPixMap                = 3,
  72.     kCMMCheckPixMap                = 4,
  73.     kCMMConcatenateProfiles        = 5,
  74.     kCMMConcatInit                = 7,
  75.     kCMMNewLinkProfile            = 16,
  76.     kNCMMConcatInit                = 18,
  77.     kNCMMNewLinkProfile            = 19,
  78.     kCMMGetPS2ColorSpace        = 11,
  79.     kCMMGetPS2ColorRenderingIntent = 12,
  80.     kCMMGetPS2ColorRendering    = 13,
  81.     kCMMGetPS2ColorRenderingVMSize = 17,
  82.  
  83.                                                                 /* obsolete with ColorSync 2.5 */
  84.     kCMMFlattenProfile            = 14,
  85.     kCMMUnflattenProfile        = 15,
  86.  
  87.                                                                 /* obsolete with ColorSync 2.6 */
  88.     kCMMInit                    = 0,
  89.     kCMMGetNamedColorInfo        = 70,
  90.     kCMMGetNamedColorValue        = 71,
  91.     kCMMGetIndNamedColorValue    = 72,
  92.     kCMMGetNamedColorIndex        = 73,
  93.     kCMMGetNamedColorName        = 74
  94. };
  95.  
  96. #if TARGET_API_MAC_OS8
  97. typedef ComponentInstance                 CMMComponentInst;
  98. EXTERN_API( CMError )
  99. NCMMInit                        (CMMComponentInst         cmm,
  100.                                  CMProfileRef             srcProfile,
  101.                                  CMProfileRef             dstProfile)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0006, 0x7000, 0xA82A);
  102.  
  103. EXTERN_API( CMError )
  104. CMMInit                            (CMMComponentInst         cmm,
  105.                                  CMProfileHandle         srcProfile,
  106.                                  CMProfileHandle         dstProfile)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0000, 0x7000, 0xA82A);
  107.  
  108. EXTERN_API( CMError )
  109. CMMMatchColors                    (CMMComponentInst         cmm,
  110.                                  CMColor *                colors,
  111.                                  UInt32                 count)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x0001, 0x7000, 0xA82A);
  112.  
  113. EXTERN_API( CMError )
  114. CMMCheckColors                    (CMMComponentInst         cmm,
  115.                                  CMColor *                colors,
  116.                                  UInt32                 count,
  117.                                  UInt32 *                result)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0002, 0x7000, 0xA82A);
  118.  
  119. EXTERN_API( CMError )
  120. CMMValidateProfile                (CMMComponentInst         cmm,
  121.                                  CMProfileRef             prof,
  122.                                  Boolean *                valid)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
  123.  
  124. EXTERN_API( CMError )
  125. CMMFlattenProfile                (CMMComponentInst         cmm,
  126.                                  CMProfileRef             prof,
  127.                                  UInt32                 flags,
  128.                                  CMFlattenUPP             proc,
  129.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x000E, 0x7000, 0xA82A);
  130.  
  131. EXTERN_API( CMError )
  132. CMMUnflattenProfile                (CMMComponentInst         cmm,
  133.                                  FSSpec *                resultFileSpec,
  134.                                  CMFlattenUPP             proc,
  135.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x000F, 0x7000, 0xA82A);
  136.  
  137. EXTERN_API( CMError )
  138. CMMMatchBitmap                    (CMMComponentInst         cmm,
  139.                                  CMBitmap *                bitmap,
  140.                                  CMBitmapCallBackUPP     progressProc,
  141.                                  void *                    refCon,
  142.                                  CMBitmap *                matchedBitmap)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x0009, 0x7000, 0xA82A);
  143.  
  144. EXTERN_API( CMError )
  145. CMMCheckBitmap                    (CMMComponentInst         cmm,
  146.                                  const CMBitmap *        bitmap,
  147.                                  CMBitmapCallBackUPP     progressProc,
  148.                                  void *                    refCon,
  149.                                  CMBitmap *                resultBitmap)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x000A, 0x7000, 0xA82A);
  150.  
  151. EXTERN_API( CMError )
  152. CMMMatchPixMap                    (CMMComponentInst         cmm,
  153.                                  PixMap *                pixMap,
  154.                                  CMBitmapCallBackUPP     progressProc,
  155.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0003, 0x7000, 0xA82A);
  156.  
  157. EXTERN_API( CMError )
  158. CMMCheckPixMap                    (CMMComponentInst         cmm,
  159.                                  const PixMap *            pixMap,
  160.                                  CMBitmapCallBackUPP     progressProc,
  161.                                  BitMap *                bitMap,
  162.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x0004, 0x7000, 0xA82A);
  163.  
  164. EXTERN_API( CMError )
  165. CMMConcatInit                    (CMMComponentInst         cmm,
  166.                                  CMConcatProfileSet *    profileSet)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
  167.  
  168. EXTERN_API( CMError )
  169. NCMMConcatInit                    (CMMComponentInst         cmm,
  170.                                  NCMConcatProfileSet *    profileSet,
  171.                                  CMConcatCallBackUPP     proc,
  172.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0012, 0x7000, 0xA82A);
  173.  
  174. EXTERN_API( CMError )
  175. CMMNewLinkProfile                (CMMComponentInst         cmm,
  176.                                  CMProfileRef *            prof,
  177.                                  const CMProfileLocation * targetLocation,
  178.                                  CMConcatProfileSet *    profileSet)                            FIVEWORDINLINE(0x2F3C, 0x000C, 0x0010, 0x7000, 0xA82A);
  179.  
  180. EXTERN_API( CMError )
  181. NCMMNewLinkProfile                (CMMComponentInst         cmm,
  182.                                  CMProfileRef             prof,
  183.                                  NCMConcatProfileSet *    profileSet,
  184.                                  CMConcatCallBackUPP     proc,
  185.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x0013, 0x7000, 0xA82A);
  186.  
  187. EXTERN_API( CMError )
  188. CMMGetPS2ColorSpace                (CMMComponentInst         cmm,
  189.                                  CMProfileRef             srcProf,
  190.                                  UInt32                 flags,
  191.                                  CMFlattenUPP             proc,
  192.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x000B, 0x7000, 0xA82A);
  193.  
  194. EXTERN_API( CMError )
  195. CMMGetPS2ColorRenderingIntent    (CMMComponentInst         cmm,
  196.                                  CMProfileRef             srcProf,
  197.                                  UInt32                 flags,
  198.                                  CMFlattenUPP             proc,
  199.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x000C, 0x7000, 0xA82A);
  200.  
  201. EXTERN_API( CMError )
  202. CMMGetPS2ColorRendering            (CMMComponentInst         cmm,
  203.                                  CMProfileRef             srcProf,
  204.                                  CMProfileRef             dstProf,
  205.                                  UInt32                 flags,
  206.                                  CMFlattenUPP             proc,
  207.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0014, 0x000D, 0x7000, 0xA82A);
  208.  
  209. EXTERN_API( CMError )
  210. CMMGetPS2ColorRenderingVMSize    (CMMComponentInst         cmm,
  211.                                  CMProfileRef             srcProf,
  212.                                  CMProfileRef             dstProf,
  213.                                  UInt32 *                vmSize)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0011, 0x7000, 0xA82A);
  214.  
  215. EXTERN_API( CMError )
  216. CMMConcatenateProfiles            (CMMComponentInst         cmm,
  217.                                  CMProfileHandle         thru,
  218.                                  CMProfileHandle         dst,
  219.                                  CMProfileHandle *        newDst)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0005, 0x7000, 0xA82A);
  220.  
  221. EXTERN_API( CMError )
  222. CMMGetNamedColorInfo            (CMMComponentInst         cmm,
  223.                                  CMProfileRef             srcProf,
  224.                                  UInt32 *                deviceChannels,
  225.                                  OSType *                deviceColorSpace,
  226.                                  OSType *                PCSColorSpace,
  227.                                  UInt32 *                count,
  228.                                  StringPtr                 prefix,
  229.                                  StringPtr                 suffix)                                FIVEWORDINLINE(0x2F3C, 0x001C, 0x0046, 0x7000, 0xA82A);
  230.  
  231. EXTERN_API( CMError )
  232. CMMGetNamedColorValue            (CMMComponentInst         cmm,
  233.                                  CMProfileRef             prof,
  234.                                  StringPtr                 name,
  235.                                  CMColor *                deviceColor,
  236.                                  CMColor *                PCSColor)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x0047, 0x7000, 0xA82A);
  237.  
  238. EXTERN_API( CMError )
  239. CMMGetIndNamedColorValue        (CMMComponentInst         cmm,
  240.                                  CMProfileRef             prof,
  241.                                  UInt32                 index,
  242.                                  CMColor *                deviceColor,
  243.                                  CMColor *                PCSColor)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x0048, 0x7000, 0xA82A);
  244.  
  245. EXTERN_API( CMError )
  246. CMMGetNamedColorIndex            (CMMComponentInst         cmm,
  247.                                  CMProfileRef             prof,
  248.                                  StringPtr                 name,
  249.                                  UInt32 *                index)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0049, 0x7000, 0xA82A);
  250.  
  251. EXTERN_API( CMError )
  252. CMMGetNamedColorName            (CMMComponentInst         cmm,
  253.                                  CMProfileRef             prof,
  254.                                  UInt32                 index,
  255.                                  StringPtr                 name)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x004A, 0x7000, 0xA82A);
  256.  
  257. #if OLDROUTINENAMES
  258. #define NCMInit(cmm, srcProfile, dstProfile)    NCMMInit(cmm, srcProfile, dstProfile)
  259. #define CMInit(cmm, srcProfile, dstProfile)    CMMInit(cmm, srcProfile, dstProfile)
  260. #define CMMatchColors(cmm, colors, count)        CMMMatchColors(cmm, colors, count)
  261. #define CMCheckColors(cmm, colors, count, result)    CMMCheckColors(cmm, colors, count, result)
  262. #define CMMatchBitmap(cmm, bitmap, progressProc, refCon, matchedBitmap)    CMMMatchBitmap(cmm, bitmap, progressProc, refCon, matchedBitmap)
  263. #define CMCheckBitmap(cmm, bitmap, progressProc, refCon, resultBitmap)    CMMCheckBitmap(cmm, bitmap, progressProc, refCon, resultBitmap)
  264. #define CMMatchPixMap(cmm, pixMap, progressProc, refCon)    CMMMatchPixMap(cmm, pixMap, progressProc, refCon)
  265. #define CMCheckPixMap(cmm, pixMap, progressProc, bitMap, refCon)    CMMCheckPixMap(cmm, pixMap, progressProc, bitMap, refCon)
  266. #define CMConcatInit(cmm, profileSet)    CMMConcatInit(cmm, profileSet)
  267. #define CMConcatenateProfiles(cmm, thru, dst, newDst) CMMConcatenateProfiles(cmm, thru, dst, newDst)
  268. #define CMNewLinkProfile(cmm, prof, targetLocation, profileSet)    CMMNewLinkProfile(cmm, prof, targetLocation, profileSet)
  269. #endif  /* OLDROUTINENAMES */
  270.  
  271. #else
  272. EXTERN_API( CMError )
  273. CMMOpen                            (UInt32 *                cmmStorage,
  274.                                  void *                    hInstance);
  275.  
  276. EXTERN_API( CMError )
  277. CMMClose                        (UInt32 *                cmmStorage);
  278.  
  279. EXTERN_API( CMError )
  280. CMMGetCMMInfo                    (UInt32 *                cmmStorage,
  281.                                  CMMInfo *                info);
  282.  
  283. EXTERN_API( CMError )
  284. NCMMInit                        (UInt32 *                cmmStorage,
  285.                                  CMProfileRef             srcProfile,
  286.                                  CMProfileRef             dstProfile);
  287.  
  288. EXTERN_API( CMError )
  289. CMMMatchColors                    (UInt32 *                cmmStorage,
  290.                                  CMColor *                colors,
  291.                                  UInt32                 count);
  292.  
  293. EXTERN_API( CMError )
  294. CMMCheckColors                    (UInt32 *                cmmStorage,
  295.                                  CMColor *                colors,
  296.                                  UInt32                 count,
  297.                                  UInt32 *                result);
  298.  
  299. EXTERN_API( CMError )
  300. CMMValidateProfile                (UInt32 *                cmmStorage,
  301.                                  CMProfileRef             prof,
  302.                                  Boolean *                valid);
  303.  
  304. EXTERN_API( CMError )
  305. CMMMatchBitmap                    (UInt32 *                cmmStorage,
  306.                                  CMBitmap *                bitmap,
  307.                                  CMBitmapCallBackUPP     progressProc,
  308.                                  void *                    refCon,
  309.                                  CMBitmap *                matchedBitmap);
  310.  
  311. EXTERN_API( CMError )
  312. CMMCheckBitmap                    (UInt32 *                cmmStorage,
  313.                                  const CMBitmap *        bitmap,
  314.                                  CMBitmapCallBackUPP     progressProc,
  315.                                  void *                    refCon,
  316.                                  CMBitmap *                resultBitmap);
  317.  
  318. EXTERN_API( CMError )
  319. CMMMatchPixMap                    (UInt32 *                cmmStorage,
  320.                                  PixMap *                pixMap,
  321.                                  CMBitmapCallBackUPP     progressProc,
  322.                                  void *                    refCon);
  323.  
  324. EXTERN_API( CMError )
  325. CMMCheckPixMap                    (UInt32 *                cmmStorage,
  326.                                  const PixMap *            pixMap,
  327.                                  CMBitmapCallBackUPP     progressProc,
  328.                                  BitMap *                bitMap,
  329.                                  void *                    refCon);
  330.  
  331. EXTERN_API( CMError )
  332. CMMConcatInit                    (UInt32 *                cmmStorage,
  333.                                  CMConcatProfileSet *    profileSet);
  334.  
  335. EXTERN_API( CMError )
  336. NCMMConcatInit                    (UInt32 *                cmmStorage,
  337.                                  NCMConcatProfileSet *    profileSet,
  338.                                  CMConcatCallBackUPP     proc,
  339.                                  void *                    refCon);
  340.  
  341. EXTERN_API( CMError )
  342. CMMNewLinkProfile                (UInt32 *                cmmStorage,
  343.                                  CMProfileRef *            prof,
  344.                                  const CMProfileLocation * targetLocation,
  345.                                  CMConcatProfileSet *    profileSet);
  346.  
  347. EXTERN_API( CMError )
  348. NCMMNewLinkProfile                (UInt32 *                cmmStorage,
  349.                                  CMProfileRef             prof,
  350.                                  NCMConcatProfileSet *    profileSet,
  351.                                  CMConcatCallBackUPP     proc,
  352.                                  void *                    refCon);
  353.  
  354. EXTERN_API( CMError )
  355. CMMGetPS2ColorSpace                (UInt32 *                cmmStorage,
  356.                                  CMProfileRef             srcProf,
  357.                                  UInt32                 flags,
  358.                                  CMFlattenUPP             proc,
  359.                                  void *                    refCon);
  360.  
  361. EXTERN_API( CMError )
  362. CMMGetPS2ColorRenderingIntent    (UInt32 *                cmmStorage,
  363.                                  CMProfileRef             srcProf,
  364.                                  UInt32                 flags,
  365.                                  CMFlattenUPP             proc,
  366.                                  void *                    refCon);
  367.  
  368. EXTERN_API( CMError )
  369. CMMGetPS2ColorRendering            (UInt32 *                cmmStorage,
  370.                                  CMProfileRef             srcProf,
  371.                                  CMProfileRef             dstProf,
  372.                                  UInt32                 flags,
  373.                                  CMFlattenUPP             proc,
  374.                                  void *                    refCon);
  375.  
  376. EXTERN_API( CMError )
  377. CMMGetPS2ColorRenderingVMSize    (UInt32 *                cmmStorage,
  378.                                  CMProfileRef             srcProf,
  379.                                  CMProfileRef             dstProf,
  380.                                  UInt32 *                vmSize);
  381.  
  382.  
  383. #endif  /* TARGET_API_MAC_OS8 */
  384.  
  385.  
  386. #if PRAGMA_STRUCT_ALIGN
  387.     #pragma options align=reset
  388. #elif PRAGMA_STRUCT_PACKPUSH
  389.     #pragma pack(pop)
  390. #elif PRAGMA_STRUCT_PACK
  391.     #pragma pack()
  392. #endif
  393.  
  394. #ifdef PRAGMA_IMPORT_OFF
  395. #pragma import off
  396. #elif PRAGMA_IMPORT
  397. #pragma import reset
  398. #endif
  399.  
  400. #ifdef __cplusplus
  401. }
  402. #endif
  403.  
  404. #endif /* __CMMCOMPONENT__ */
  405.  
  406.